package com.d0327;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class Test4 {
    public static void main(String[] args) {
        Random r = new Random();
        List<Integer> list = new ArrayList<Integer>();
        int i;
        while(list.size() < 10){
            i = r.nextInt((10)+1);
            if(!list.contains(i)){
                list.add(i);
            }
        }
        for (Integer a:
             list) {
            System.out.println(a);
        }
    }
}
